namespace Sample.Domain
{
    public class Place
    {
        private Place()
        {
        }

        public static Place Create(string description, double latitude, double longitude)
        {
            var place = new Place
                            {
                                Description = description,
                                Latitude = latitude,
                                Longitude = longitude
                            };
            return place;
        }

        public virtual string Description { get; private set; }
        public virtual double Latitude { get; private set; }
        public virtual double Longitude { get; private set; }

        public override bool Equals(object obj)
        {
            return this.IsEqual(obj);
        }

        public override int GetHashCode()
        {
            return HashCodeGenerator.GenerateHashCode(Description, Latitude, Longitude);
        }
    }
}